#include "test.h"

void handler(int signal)
{
    std::cout << "Successful capture signal Ctrl + \\: " << signal  << ' ' << getpid() << std::endl;
}

int main()
{
    //捕获 Ctrl + c产生的2号信号
    //signal(SIGINT, handler);
    //signal(SIGQUIT, handler);

    while(true)
    {
        std::cout << "I am process!!! ppid: " << getppid() << "getpid(): " << getpid() << std::endl;
        sleep(1);
    }

    return 0;
}
